#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>

int main()
{
	pid_t id = getpid(); //获取进程id
	pid_t fid = getppid(); //获取父进程id
	while(1)
	{
		printf("I am a process! pid: %d, ppid: %d\n",id,fid);
		sleep(1);
	}
	return 0;
}
